<template>
  <div>
    <bread-crumb :crumb="crumb"></bread-crumb>
    <el-card>
      <el-table :data="tableData">
        <el-table-column type="index" label="#"></el-table-column>
        <el-table-column label="操作人" prop="operator"></el-table-column>
        <el-table-column label="操作时间" prop="operateTime"></el-table-column>
        <el-table-column label="操作内容" prop="operatingRecord"></el-table-column>
      </el-table>
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="queryInfo.pagenum"
        :page-sizes="[100, 200, 300, 400]"
        :page-size="100"
        layout="total, sizes, prev, pager, next, jumper"
        :total="400">
      </el-pagination>
    </el-card>
  </div>
</template>
<script>
import breadCrumb from '../../components/common/Breadcrumb'
export default {
  name: 'viewlog',
  components: {
    breadCrumb
  },
  data () {
    return {
      tableData: [],
      queryInfo: {
        pagesize: 2,
        pagenum: 1
      },
      crumb: ['账户管理', '操作日志查询']
    }
  },
  created () {
    this.getViewLog()
  },
  methods: {
    async getViewLog () {
      const { data: res } = await this.$axios.get('viewlog.json')
      if (res.meta.status !== 200) {
        return this.$message.error('获取列表日志失败')
      }
      this.tableData = res.data
    },
    // TODO: 等待后端接口接收数据
    handleSizeChange () {},
    handleCurrentChange () {}
  }
}
</script>
<style lang="scss" scoped>
</style>
